package fuxi2;

public class Draw {
    int count;
    int lines;
    public Draw(){
    }
    public Draw(int c,int l){
        count=c;
        lines=l;
    }
    //打印直角三角形
    public void drawTrian(){
        for (int i=0;i<lines;i++){
            for (int j=0;j<=i;j++){
                System.out.print("*");
            }
            System.out.println();
        }
    }
    //打印矩形
    public void drawRec(){
        for (int i=0;i<lines;i++){
            for (int j=0;j<count;j++){
                System.out.print("*");
            }
            System.out.println();
        }
    }

    public void drawPra(){
        for (int i=0;i<lines;i++){
            //打印空格
            for (int k=0;k<i;k++){
                System.out.print(" ");
            }
            //打印*
            for (int j=0;j<count;j++){
                System.out.print("*");
            }
            System.out.println();
        }

    }



}
